package com.example.customstarter.service;

import com.example.customstarter.properties.CustomProperties;
import org.springframework.beans.factory.annotation.Autowired;

public class CustomService {

    private final CustomProperties properties;

    @Autowired
    public CustomService(CustomProperties properties) {
        this.properties = properties;
    }

    public int add(int a, int b) {
        System.out.println("Using custom service with name: " + properties.getName());
        return a + b;
    }
}    